package com.ying.tests.AAAmode.strategy1.controller;

import com.alibaba.fastjson.JSONObject;
import com.ying.tests.AAAmode.strategy1.service.RobotService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@RequestMapping(value = "/one/robot")
public class OneRobotController {

    @Autowired
    private RobotService robotService;

    /**
     * 转接机器人
     * @param jsonObject
     */
    @PostMapping(value = "/turnRobot")
    public void turnRobot(@RequestBody JSONObject jsonObject) {
        robotService.turnRobot(jsonObject.toJSONString());
    }

}
